package top.infopub.mgr.bpa.domain;

import org.apache.commons.lang3.StringUtils;
import top.infopub.enums.bpa.ContractTypeEnum;

import java.math.BigDecimal;

public class ContractEntryDomain {

    /*pk*/
    private String id;
    /*项目编码*/
    private String proCode;
    /*项目名称*/
    private String proName;
    /*合同名称*/
    private String negName;
    /*合同类型*/
    private String contractType;
    /*总合同期（年）*/
    private BigDecimal conTotalYears;
    /*项目负责人*/
    private String projectLeader;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProCode() {
        return proCode;
    }

    public void setProCode(String proCode) {
        this.proCode = proCode;
    }

    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    public String getNegName() {
        return negName;
    }

    public void setNegName(String negName) {
        this.negName = negName;
    }

    public String getContractType() {
        return contractType;
    }

    public void setContractType(String contractType) {
        this.contractType = contractType;
        if (StringUtils.isNotBlank(contractType)) {
            ContractTypeEnum ppdt = ContractTypeEnum.getByCode(contractType);
            if (ppdt != null) {
                setContractType(ppdt.getName());
            }
        }
    }

    public BigDecimal getConTotalYears() {
        return conTotalYears;
    }

    public void setConTotalYears(BigDecimal conTotalYears) {
        this.conTotalYears = conTotalYears;
    }

    public String getProjectLeader() {
        return projectLeader;
    }

    public void setProjectLeader(String projectLeader) {
        this.projectLeader = projectLeader;
    }
}
